LIBDIR		= /usr/lib
LIBS		= -lm -lklu

RM			= rm -f
AR			= ar qcv

CC			=gcc -g -O0

SRC=auxiliary.c stack.c thermal.c
OBJ=auxiliary.o stack.o thermal.o

all: 3DSST lib

3DSST: 3dsst.o $(OBJ)
	$(CC) -o 3dsst 3dsst.o $(OBJ) $(LIBS)

3dsst.o: 3dsst.c
	$(CC) -c 3dsst.c

auxiliary.o: auxiliary.c
	$(CC) -c auxiliary.c

stack.o: stack.c
	$(CC) -c stack.c

thermal.o: thermal.c
	$(CC) -c thermal.c

lib: 3dsst
	$(RM) lib3dsst.a
	$(AR) lib3dsst.a $(OBJ)
	ranlib lib3dsst.a

clean:
	$(RM) 3dsst lib3dsst.a *.o
	
